<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="facade.*,servlets.*,entities.*,vo.*,java.util.List;"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<jsp:include page="/MenuPrincipal.jsp" 	
   flush="true| false" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900" rel="stylesheet" />
<link href="default.css" rel="stylesheet" type="text/css" media="all" />
<link href="fonts.css" rel="stylesheet" type="text/css" media="all" />
<!-- meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> -->
<title>Configuracion</title>
</head>
<body>
<div id="wrapper">
<div id="header-wrapper">
<p align="center"><b>Configuracion</b></p>
</div>

<form action="ConfiguracionServlet" method="get">
<div id="page">
<table id="tableId" border="" width="100%">
		<tr>
			<td>Id</td>
			<td>Servicio</td>
			<td>Modulo</td>
			<td>Comunicacion</td>
			<td>IP</td>
			<td>Activo</td>
		</tr>
	
		<% 
		List<ConfiguracionVO> configuraciones = (List<ConfiguracionVO>)request.getAttribute("configuraciones");
		for (int i=0;i<configuraciones.size();i++){
			ConfiguracionVO conf = configuraciones.get(i);
		%>	  
		<tr>
			<td><a href="ConfiguracionServlet?accion=obtenerConfiguracion&id=<%=conf.getId()%>"><%=conf.getId()%></a></td>
			<td><%=conf.getServicio()%></td>
			<td><%=conf.getModulo()%></td>
			<td><%=conf.getTipoComunicacion()%></td>
			<td><%=conf.getIp()%></td>
			<td><%=conf.isActivo()%></td>		
		</tr> 
		<% } %>
		
		<!-- 
		<tr>
			<td>1</td>
			<td>informarVenta</td>
			<td>LogisticayMonitoreoG17</td>
			<td>Sincronico</td>
			<td>172.15.174.43</td>
			<td>true</td>
		</tr>
		<tr>
			<td>2</td>
			<td>informarVenta</td>
			<td>LogisticayMonitoreoG15</td>
			<td>Asincronico</td>
			<td>172.15.174.41</td>
			<td>false</td>
		</tr>
		<tr>
			<td>2</td>
			<td>notificarEntregaDespacho</td>
			<td>DespachoG01</td>
			<td>Asincronico</td>
			<td>172.15.174.45</td>
			<td>true</td>
		</tr>
		-->
		
	</table>
	<br>
	
	<br>
	<br>
	<% ConfiguracionVO conf2 = (ConfiguracionVO)request.getAttribute("configuracionElegida");
		if (conf2 != null){
	 %>
	<table id="tableId2" border="" width="50%">
	<tr>
		<td>Id :</td>
		<td><%=conf2.getId()%></td>
	</tr>
	<tr>
		<td>Servicio :</td>
		<td><%=conf2.getServicio()%></td>
	</tr>
	<tr>
		<td>Modulo :</td>
		<td><%=conf2.getModulo()%></td>
	</tr>
	<tr>
		<td>Comunicacion :</td>
		<td><SELECT name="tipoComunicacion" value="<%=conf2.getTipoComunicacion()%>">
		<OPTION value="Sincronico">Sincronico</OPTION>
		<OPTION value="Asincronico">Asincronico</OPTION>
		</SELECT></td>
	</tr>
	<tr>
		<td>IP: </td>
		<td><INPUT TYPE="text" NAME="ip" value="<%=conf2.getIp()%>"></td>
	</tr>
	<tr><td>Activo:</td>
		<td><SELECT name="activo" value="<%=conf2.isActivo()%>">
			<OPTION value="true">TRUE</OPTION>
			<OPTION value="false">FALSE</OPTION>
		    </SELECT></td>
	</tr>
	</table>
	<INPUT type="submit" VALUE="Confirmar Cambios">
	<input name="id" type="hidden" value="<%=conf2.getId()%>">
	<input name="servicio" type="hidden" value="<%= conf2.getServicio()%>">
    <input name="modulo" type="hidden" value="<%=conf2.getModulo()%>">
	<input name="accion" type="hidden" value="submitirConfiguracion"></INPUT>
	<% } %>
</div>
</form>
</div>
</body>
</html>